setTooltipText

open fun setTooltipText(@NonNull view: @NonNull View, @Nullable tooltipText: @Nullable CharSequence)(source)

Sets the tooltip text for the view.

On API 26 and later, this method calls through to setTooltipText.

Prior to API 26, this method sets or clears (when tooltipText is null) the view's OnLongClickListener and OnHoverListener. A tooltip-like sub-panel will be created on long-click or mouse hover.

Parameters

view

the view on which to set the tooltip text

tooltipText

the tooltip text